package com.app.sysmodule.utils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by song on 2018/3/28.
 * 单例
 * 创建一个支持并发的hashmap类
 */
public class ConcurrentHashMapUtil {
    private static  ConcurrentHashMapUtil install = null;
    private static Map<String,Object> map = new ConcurrentHashMap<String,Object>();
    private ConcurrentHashMapUtil(){

    }
    public static ConcurrentHashMapUtil getInstall(){
        if(null != install){
            install = new ConcurrentHashMapUtil();
        }
        return install;
    }
    public static Map<String, Object> getMap() {
        return map;
    }

    public static void setMap(Map<String, Object> map) {
        ConcurrentHashMapUtil.map = map;
    }
}
